expander: Make a code snippet compile
authorTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 13:29:00 +0000 (14:29 +0100)
committerTimm Bäder <mail@baedert.org>
Wed, 3 Jan 2018 16:11:32 +0000 (17:11 +0100)
gtk/gtkexpander.c

index e02ef8881a2a45f2bbfc162d0d5d13cca865973d..33c2d1345ccd8adae79b4eb064de538a0f16800c 100644 (file)
  * connection as follows:
  *
  * |[<!-- language="C" -->
- * expander = gtk_expander_new_with_mnemonic ("_More Options");
- * g_signal_connect (expander, "notify::expanded",
- *                   G_CALLBACK (expander_callback), NULL);
- *
- * ...
- *
  * static void
  * expander_callback (GObject    *object,
  *                    GParamSpec *param_spec,
  *       // Hide or destroy widgets
  *     }
  * }
+ *
+ * static void
+ * create_expander (void)
+ * {
+ *   GtkWidget *expander = gtk_expander_new_with_mnemonic ("_More Options");
+ *   g_signal_connect (expander, "notify::expanded",
+ *                     G_CALLBACK (expander_callback), NULL);
+ *
+ *   // ...
+ * }
  * ]|
  *
  * # GtkExpander as GtkBuildable